#ifndef __GDI__H__
#define __GDI__H__

#include <loader.h>
#include <apps.h>

#define GDI_TIMER		0xA1039

#define GDI_INACTIVE	0x0
#define GDI_SYSTEMDC	0x1
#define GDI_PRIVATEDC	0x2

#define E_NONE	0x0

#define E_UPTODOWN		0x1
#define E_DOWNTOUP		0x2
#define E_LEFTTORIGHT	0x4
#define E_RIGHTTOLEFT	0x8
#define E_CENTERTOLR	0x10
#define E_LRTOCENTER	0x20

#define E_INNER		0x100
#define E_OUTHER	0x200

#ifdef __cplusplus
extern "C" {
#endif // __cplusplus

UINT32 GDI_Init(AHIDEVCONTEXT_T* dCtx, AHISURFACE_T* sDisp, AHISURFACE_T* sDraw, const char* szIdent, UINT8 dMode, UINT32 dDefPatMode, UINT32 dDrawPatMode, BOOL dBufEnabled);
UINT32 GDI_UnInit(AHIDEVCONTEXT_T* dCtx);

UINT32 GDI_BeginPaint(AHIDEVCONTEXT_T* hDC, AHISURFACE_T* sDisp, AHISURFACE_T* sDraw);
UINT32 GDI_EndPaint(AHIDEVCONTEXT_T* hDC, AHISURFACE_T* sDisp, AHISURFACE_T* sDraw);
UINT32 GDI_EndPaintWithEffect(AHIDEVCONTEXT_T* dCtx, AHISURFACE_T* sDisp, AHISURFACE_T* sDraw, UINT32 dEffect, void* app, UINT32 dTime);

UINT32 GDI_FillRect(AHIDEVCONTEXT_T* dCtx, UINT32 X, UINT32 Y, UINT32 W, UINT32 H, UINT32 brFg);
UINT32 GDI_DrawRect(AHIDEVCONTEXT_T* dCtx, UINT32 X, UINT32 Y, UINT32 W, UINT32 H, UINT32 brFg);

void GDI_DrawEffect(AHIDEVCONTEXT_T* dCtx, void* app);

#ifdef __cplusplus
}
#endif // __cplusplus

#endif // __GDI__H__
